import {
	http
} from "@/utils/axios"
export function Top() {
	// 轮播图
	return http('/api/goods/is_new/1', 'get')
}
export function home_new() {
	// 新品上市
	return http('/api/goods/is_new/1', 'get')
}
export function home_tui() {
	// 热门推荐
	return http('/api/goods/is_recommend/1', 'get')
}
export function home_url() {
	// 拼接网址url路由
	return 'https://img.9lele.com/'
}
export function details_xq(goods_id) {
	// 详情
	return http(`/api/goods/detail/${goods_id}`, 'get')
}
export function getcart(member_id) {
	// 获取购物车信息
	return http(`/api/getCartList/?member_id=${member_id}`, 'get')
}
export function addcart(data) {
	// 添加购物车信息
	// console.log(xqy, '详情页55')
	return http(
		`/api/addcart/?member_id=${data.member_id}&goods_id=${data.goods_id}&goods_name=${data.goods_name}&price=${data.shop_price}&number=${data.store_count}&sku_id=1&sku_pname=2&sku_sname=1&goods_img=${data.original_img}&remark=${data.goods_remark} `,
		'post')

}
export function search(value) {
	// 搜索
	return http(`/api/goods/search/1/${value}`, 'get')
}
export function navfl(id) {
	// nav分类
	return http(`/api/goods/getMenuGoodsList/1/${id}`, 'get')
}
export function login(phone) {
	// nav分类
	return http(`/api/login/?phone=${phone}`, 'post')
}
export function delcart(id) {
	// nav分类
	return http(`/api/deletecart/?id=${id}`, 'get')
}
export function clearAll(member_id) {
	// nav分类
	return http(`/api/clearcart/?member_id=${member_id}`, 'get')
}
// 获取地址
export function GetAddress(member_id) {
	// nav分类
	return http(`/api/getAddressList/?member_id=${member_id}`, 'get')
}
